#include "choosemode.h"
#include "ui_choosemode.h"
#include "mainwindow.h"
#include "producedata.h"
#include "player.h"
#include "inputtext.h"

ChooseMode::ChooseMode(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ChooseMode)
{
    ui->setupUi(this);
    connect(ui->inputModeButton, SIGNAL(clicked()), this, SLOT(inputModeChoosed()));
    connect(ui->dataModeButton, SIGNAL(clicked()), this, SLOT(dataModeChosssed()));
    connect(ui->produceButton, SIGNAL(clicked()), this, SLOT(produceModeChossed()));
    connect(ui->inputTextButton, SIGNAL(clicked()), this, SLOT(inputTextChossed()));
}

ChooseMode::~ChooseMode()
{
    delete ui;
}

void ChooseMode::inputModeChoosed()
{
    MainWindow *w = new MainWindow;
    w->show();
    this->close();
}

void ChooseMode::dataModeChosssed()
{
    Player *p = new Player;
    p->show();
    this->close();
}

void ChooseMode::produceModeChossed()
{
    ProduceData *p = new ProduceData;
    p->show();
    this->close();
}

void ChooseMode::inputTextChossed()
{
    InputText *w = new InputText;
    w->show();
    this->close();
}
